<?php
class CourseSpecialisationsController extends AppController{

	var $uses = array('CourseSpecialisation');

	function beforeFilter(){
		parent::beforeFilter();
	}

	/*
	 * standard method
	 */
	public function index(){
	}

	function add(){

		if(!empty($this->data)){
				
		}

		$this->data = $this->Course->find('all');

		$this->_addLists();
	}

	function _addLists(){
		// get professor  ---------------------
		$params = array(
			'fields' => array('Professor.id','Professor.select_identifier')
		);
		$profs = $this->Course->Professor->find('list',$params);
		$this->set('professors',$profs);

		// get CourseSpecialisation  ---------------------
		$params = array(
			'fields' => array('CourseSpecialisation.id','CourseSpecialisation.specialisation_name')
		);
		$spec = $this->Course->CourseSpecialisation->find('list',$params);
		$this->set('courseSpecialisations',$spec);

		// get profiles  ---------------------
		$params = array(
			'fields' => array('Profile.id','Profile.profile_name')
		);
		$profiles = $this->Course->Profile->find('list',$params);
		$this->set('profiles',$profiles);

		// get study braches  ---------------------
		$params = array(
			'fields' => array('StudyBranch.id','StudyBranch.branch_name')
		);
		$select = $this->Course->StudyBranch->find('list',$params);
		$this->set('studyBranches',$select);
	}

	function update($id=null){

	}

}
?>
